import React from 'react';
import ReactDOM from 'react-dom';

let el=document.getElementById('react');
window.InitTemplate=function(Comp){
    Comp=Comp.default||Comp;
    let comp=React.createElement(Comp);
    ReactDOM.render(comp,el);
};
/*let path=el.getAttribute("data-src");
let val=jQuery.ajax({
    method:"GET",
    dataType:"text",
    url:path,
    success:text=>{
        let Comp=eval(text);
        Comp=Comp.default||Comp;
        let comp=React.createElement(Comp);
        ReactDOM.render(comp,el);
    },
    error:(x)=> {
        console.log(x);
    }
});*/
/*console.log(path);
//let Comp=require(path);
Comp=Comp.default||Comp;

let comp=React.createElement(Comp);*/


